<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>thread_pool::attach</title>
    <link rel="stylesheet" href="../../../boostbook.css" type="text/css">
    <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
    <link rel="home" href="../../../index.html" title="Asio">
    <link rel="up" href="../thread_pool.html" title="thread_pool">
    <link rel="prev" href="add_service.html" title="thread_pool::add_service">
    <link rel="next" href="destroy.html" title="thread_pool::destroy">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%">
    <tr>
        <td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../../asio.png"></td>
    </tr>
</table>
<hr>
<div class="spirit-nav">
    <a accesskey="p" href="add_service.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u"
                                                                                            href="../thread_pool.html"><img
        src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png"
                                                                                            alt="Home"></a><a
        accesskey="n" href="destroy.html"><img src="../../../next.png" alt="Next"></a>
</div>
<div class="section">
    <div class="titlepage">
        <div>
            <div><h4 class="title">
                <a name="asio.reference.thread_pool.attach"></a><a class="link" href="attach.html"
                                                                   title="thread_pool::attach">thread_pool::attach</a>
            </h4></div>
        </div>
    </div>
    <p>
        <a class="indexterm" name="asio.indexterm.thread_pool.attach"></a>
        Attaches the current
        thread to the pool.
    </p>
    <pre class="programlisting"><span class="keyword">void</span> <span class="identifier">attach</span><span
            class="special">();</span>
</pre>
    <p>
        This function attaches the current thread to the pool so that it may be
        used for executing submitted function objects. Blocks the calling thread
        until the pool is stopped or joined and has no outstanding work.
    </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%">
    <tr>
        <td align="left"></td>
        <td align="right">
            <div class="copyright-footer">Copyright © 2003-2022 Christopher M. Kohlhoff<p>
                Distributed under the Boost Software License, Version 1.0. (See accompanying
                file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
            </p>
            </div>
        </td>
    </tr>
</table>
<hr>
<div class="spirit-nav">
    <a accesskey="p" href="add_service.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u"
                                                                                            href="../thread_pool.html"><img
        src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png"
                                                                                            alt="Home"></a><a
        accesskey="n" href="destroy.html"><img src="../../../next.png" alt="Next"></a>
</div>
</body>
</html>
